WARNING: This program has a logic error! That means the program still runs but doesn't do what we want it to

RULE: Commands INSIDE an event should be indented! An indent is 4 spaces or 1 tab.

  • Click Run and watch the stage. The planet isn't supposed to just leave the stage!
  • Correct the program so that the planet repeats the actions of moving forward and turning.

To navigate the page using the TAB key, first press ESC to exit the code editor.

stage.set_background("space") sprite = codesters.Sprite("mars", 0, -200) def interval(): sprite.move_forward(50) sprite.turn_left(30) stage.event_interval(interval, .5)
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)